// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
#include "pch.h"
#include "WeatherImageProvider.h"

using namespace Weathr;

using namespace std;
using namespace Windows::Storage;

// Retrieves the path to the image file on disk that represents the provided weather conditions.
// NOTE: You might load these from an external configuration file.
wstring WeatherImageProvider::GetWeatherImage(WeatherType weatherType, bool night)
{
    wstring fileName;
    switch (weatherType)
    {
    case WeatherType::Clear:
        fileName = night ? L"Moon" : L"Sunny";
        break;
    case WeatherType::Cloudy:
        fileName = night ? L"Cloudy-night" : L"Cloudy";
        break;
    case WeatherType::Drizzle:
        fileName = L"Drizzle";
        break;
    case WeatherType::Haze:
        fileName = L"Haze";
        break;
    case WeatherType::MostlyCloudy:
        fileName = night ? L"Cloudy-night" : L"Mostly Cloudy";
        break;
    case WeatherType::SlightDrizzle:
        fileName = night ? L"Drizzle-night" : L"Slight Drizzle";
        break;
    case WeatherType::Snow:
        fileName = L"Snow";
        break;
    case WeatherType::Thunderstorms:
        fileName = L"Thunderstorms";
        break;
    case WeatherType::Unknown:
    default:
        fileName = L"Unknown";
        break;
    }

    return L"ms-appx:///Assets/" + fileName + L".png";
}


